﻿@using System.Configuration
@*
    TicketDesk - Attribution notice
    Contributor(s):

         Stephen Redd (stephen@reddnet.net, http://www.reddnet.net)
         Wootz (https://github.com/Wootz)

    This file is distributed under the terms of the Microsoft Public
    License (Ms-PL). See http://opensource.org/licenses/MS-PL
    for the complete terms of use.

    For any distribution that contains code from this file, this notice of
    attribution must remain intact, and a copy of the license must be
    provided to the recipient.
*@
        <div class="form-group">
            <input type="hidden" name="deleteFiles"/>
            <input type="hidden" name="tempId" value="@ViewBag.TempId"/>
            <label class="col-md-2 col-sm-1 control-label">Files</label>
            <div class="col-md-8 col-sm-11">
                @{
                    var demoMode = ConfigurationManager.AppSettings["ticketdesk:DemoModeEnabled"] ?? "false";
                    if (demoMode.Equals("true", StringComparison.InvariantCultureIgnoreCase))
                    {
                        <div class="alert alert-warning">
                            <p>TicketDesk is running demo mode. Attachment Uploads are disabled.</p>
                            <p> To turn off demo mode, please change the setting in application configuration.</p>
                        </div>
                    }
                    else
                    {
                        <div class="dropzone" style="min-height: 40px;" id="attachmentsDropZone">
                            <div class="dz-message dz-size" data-dz-message><i class="fa fa-download "></i> Drop attachments here, or click to select files.</div>
                            <div class="dropzone-previews" id="dz-preview"></div>
                        </div>
                    }
                }
            </div>
        </div>
    

